package com.foreverwin.jzymes.common.service;

import com.foreverwin.jzymes.common.domain.NcData;
import com.foreverwin.jzymes.common.enums.DispositionEnum;
import com.foreverwin.jzymes.production.sfc.domain.SFC;

import java.util.Date;
import java.util.List;

public interface INCDataAdviceService {

    /**
     * 保存不良数据
     *
     * @param sfc
     * @param resource
     * @param carrier
     * @param dateCode
     * @param ncCode
     * @param ncQty
     * @param dispositionEnum
     * @param date
     */
    public void saveNcData(SFC sfc, String carrier, String dateCode, String resource, String ncCode, Long ncQty, DispositionEnum dispositionEnum, Date date );

    /**
     * 保存不良数据
     *
     * @param sfc
     * @param carrier
     * @param dateCode
     * @param resource
     * @param operation
     * @param ncCode
     * @param ncQty
     * @param dispositionEnum
     * @param date
     */
    public void saveNcData(SFC sfc, String carrier, String dateCode, String resource, String operation, String ncCode, Long ncQty, DispositionEnum dispositionEnum, Date date );

    /**
     * 查询本体自绑定起打开的不良记录
     *
     * @param site
     * @param carrier
     * @return
     */
    public List<NcData> findOpenNcDataFromDate(String site, String carrier );

    /**
     * 查询本体在指定时间之后打开的不良记录
     *
     * @param site
     * @param carrier
     * @param fromDate
     * @return
     */
    public List<NcData> findOpenNcDataFromDate( String site, String carrier, Date fromDate );

    /**
     * 查询本体在指定时间和指定工序打开的不良记录
     *
     * @param site
     * @param carrier
     * @param fromDate
     * @param operation
     * @return
     */
    public List<NcData> findOpenNcDataFromDate( String site, String carrier, Date fromDate, String operation );

    /**
     * 查询本体自绑定起在指定工序打开的不良记录
     *
     * @param site
     * @param carrier
     * @param operation
     * @return
     */
    public List<NcData> findOpenNcDataFromDate( String site, String carrier, String operation );


    /**
     * 查询本体物料在工序的不良信息
     *
     * @param site
     * @param carrier
     * @param itemBo
     * @param operation
     * @return
     */
    public NcData findCarrierNcDataFromDate( String site, String carrier, String itemBo, String operation );

    /**
     * 查询本体物料在工序打开不良项目
     *
     * @param site
     * @param carrier
     * @param itemBo
     * @param operation
     * @return
     */
    public NcData findItemOpenNcDataFromDate( String site, String carrier, String itemBo, String operation );

    /**
     * 查询本体物料打开的不良信息
     *
     * @param site
     * @param carrier
     * @param itemBo
     * @return
     */
    public NcData findItemOpenNcDataFromDate( String site, String carrier, String itemBo );


}
